package com.nami.store.biz.privatehismsgs.application;

import com.nami.store.api.request.message.HisMsgQryRequest;
import com.nami.store.api.request.message.PrivateMsgReq;
import com.nami.store.api.response.message.MessageDTO;
import com.nami.store.biz.privatehismsgs.service.PrivateChatDomainService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@RequiredArgsConstructor
public class PrivateMsgsAppServiceImpl implements PrivateMsgsAppService {

    private final PrivateChatDomainService chatDomainService;

    @Override
    public boolean storePrivateMsg(PrivateMsgReq request) {
        if (request == null) {
            return Boolean.FALSE;
        }
        return chatDomainService.storePrivateMsg(request);
    }

    @Override
    public List<MessageDTO> getHisMsgs(HisMsgQryRequest request) {
        return chatDomainService.getHisMsgs(request);
    }

}
